package com.example.myys.data.dao

import androidx.room.Dao
import androidx.room.Query
import com.example.myys.data.entity.ChapterBean

@Dao
interface ChapterDao: BaseBeanDao<ChapterBean> {
    @Query("SELECT * FROM cached_chapters WHERE dataBeanId=:dataBeanId ORDER BY `index`")
    suspend fun getListByDataBeanId(dataBeanId:Int):List<ChapterBean>
    @Query("SELECT * FROM cached_chapters WHERE id=:id AND dataBeanId=:dataBeanId")
    suspend fun getChapterContent(id:Int,dataBeanId: Int):ChapterBean
}